Skip to content

Add zizmor security scanner to pre-commit#301

Open
hugovk wants to merge 5 commits into
hukkin:masterfrom
hugovk:master
Open

Add zizmor security scanner to pre-commit#301
hugovk wants to merge 5 commits into
hukkin:masterfrom
hugovk:master

Conversation

@hugovk
Copy link
Copy Markdown
Contributor

@hugovk hugovk commented Jun 2, 2026

tomli got a mention in this blogpost (and presumably PyCon US talk) for being a high-download package that doesn't use Trusted Publishing:

https://nesbitt.io/2026/05/25/github-actions-security-in-python-packages.html

Trusted Publishing is a way to use short-lived tokens for upload, instead of a long-lived token in the repo secrets.

I recommend setting up Trusted Publishing, it can help guard against supply chain attacks, and we've seen many in the past couple of months (the blog post mentions a bunch).

Here's how to set it up:

https://docs.pypi.org/trusted-publishers/

I'm happy to help out.


I also recommend using the zizmor security linter for GitHub Actions. It flags many of the insecure things in GHA that have caused recent malicious takeovers.

I've put it into pre-commit here, and fixed all the findings; except added an ignore for Trusted Publishing to the config for now.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5a77b12) to head (4f592c9).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #301   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          535       535           
  Branches       100       100           
=========================================
  Hits           535       535           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant